<template>
    <ui-main :title="$route.name">
        
        <div class="m-50">
            <el-input type="number" v-model="n" style="width:200px;margin-right:20px;"  placeholder="输入格式化金额" >
                <el-select v-model="unit" slot="append" placeholder="请选择" style="width:90px;">
                    <el-option label="无单位" value=""></el-option>
                    <el-option label="万" value="万"></el-option>
                </el-select>
            </el-input>
            <b class="t-teal f-16">{{n | amount(unit)}}</b>
        </div>

        <ui-load-md no-bar file="./formatAmount.md"></ui-load-md>
    </ui-main>
</template>
<script>
    export default {
        data(){
            return {
                n:1323000,
                unit:'万'
            }
        },
        mounted() {
            console.log(this.$bui.formatAmount('-100.11'))
        }
    }
</script>